Vue.component('z-dialog', {
    props: {
        show: {
            type: Boolean,
            default: false
        },
        msg: {
            type: String,
            default: ''
        }
    },
    methods: {
        know() {
            this.$emit('handle')
        }
    },
    template: `
        <div class="js_dialog" v-show="show">
            <div class="weui-mask"></div>
            <div class="weui-dialog">
                <div class="weui-dialog__bd">{{msg}}</div>
                <div class="weui-dialog__ft">
                    <a href="javascript:;" class="weui-dialog__btn weui-dialog__btn_primary" @click="know">知道了</a>
                </div>
            </div>
        </div>
    `
})
Vue.component('z-toast', {
    props: {
        show: {
            type: Boolean,
            default: false
        },
        msg: {
            type: String,
            default: '已完成'
        },
        loading: {
            type: Boolean,
            default: false
        }
    },
    template: `
    <div v-show="show">
        <div class="weui-mask_transparent"></div>
        <div class="weui-toast">
            <i class="weui-icon_toast" :class="loading?'weui-loading':'weui-icon-success-no-circle'"></i>
            <p class="weui-toast__content">{{msg}}</p>
        </div>
    </div>
    `
})